import React,{ Component } from "react";
import { View,Text,Button } from "react-native";

export default class page4 extends Component {
    static navigationOptions = ({ navigation })=>({
        title:navigation.state.params.name,
    });
    render(){
        const { navigation } = this.props;
        return (
            <View style={{flex:1,backgroundColor:'gary',}}>
                <Text>我的page4</Text>
                <Button onPress={()=>{
                    navigation.openDrawer();
                }} title="open 打开"/>
                <Button onPress={()=>{
                navigation.closeDrawer();
            }} title="Toggle Drawer"/>
                <Button onPress={()=>{
                    navigation.navigate("Page4");
                }} title="to go Page5"/>
            </View>
        )
    }
}